﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MembersList.aspx.cs" Inherits="Default_MembersList" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style type="text/css">
        hr
        {
            height:1px;
            color:#62A7D9;
        }
        body  
        {
            font-size:62.5%;
        }
        .divradius
        {
            font-size:12px;
            text-align:right;
            vertical-align:middle;
            height:36px;
            border:1px solid #62A7D9;
            background-color:#FFFFFF;
            -moz-border-radius:4px;
            -webkit-border-radius:4px;
            border-radius: 4px;
  	        behavior: url(<%=ResolveUrl("~/js/ie-css3.htc")%>);
        }
    </style>
    <link rel="Stylesheet" href="../css/tablesorter.css" />
    <link rel="Stylesheet" href="../css/popdialogbox.css" />
    <link rel="stylesheet" href="../css/jquery-ui-1.8.16.custom.css" type="text/css"/>
    <link rel="Stylesheet" type="text/css" href="../css/tablesorter.css" media="print, projection, screen" />
    <script type="text/javascript" src="<%=ResolveUrl("~/js/jquery-1.4.2.min.js")%>"></script>
    <script type="text/javascript" src="<%=ResolveUrl("~/js/jqueryui/jquery.ui.core.js")%>"></script>
    <script type="text/javascript" src="<%=ResolveUrl("~/js/jqueryui/jquery.ui.widget.js")%>"></script>
    <script type="text/javascript" src="<%=ResolveUrl("~/js/jqueryui/jquery.ui.tabs.js")%>"></script>
    <script type="text/javascript" src="<%=ResolveUrl("~/js/jqueryui/jquery.ui.button.js")%>"></script>
    <script type="text/javascript" src="<%=ResolveUrl("~/js/jqueryui/jquery.ui.datepicker.js")%>"></script>
    <script type="text/javascript" src="<%=ResolveUrl("~/js/popupdialogbox.js")%>"></script>
    <script type="text/javascript">
        $(document).ready(function () {
//            $("#btnReset").click(function(){
//                $("#<%=txtAddStartDate.ClientID%>").val("");
//                $("#<%=txtAddEndDate.ClientID%>").val("");
//                $("#<%=txtExpireStartDate.ClientID%>").val("");
//                $("#<%=txtExpireEndDate.ClientID%>").val("");
//                 $("#<%=btnQuery.ClientID%>").val("");
//                $("select option:nth-child(0)").attr("selected" , "selected");                
//                
//            });

            $("#<%=txtAddStartDate.ClientID%>").datepicker();
            $("#<%=txtAddStartDate.ClientID%>").datepicker("option", "dateFormat", "yy-mm-dd");
            $("#<%=txtAddEndDate.ClientID%>").datepicker();
            $("#<%=txtAddEndDate.ClientID%>").datepicker("option", "dateFormat", "yy-mm-dd");
            $("#<%=txtExpireStartDate.ClientID%>").datepicker();
            $("#<%=txtExpireStartDate.ClientID%>").datepicker("option", "dateFormat", "yy-mm-dd");
            $("#<%=txtExpireEndDate.ClientID%>").datepicker();
            $("#<%=txtExpireEndDate.ClientID%>").datepicker("option", "dateFormat", "yy-mm-dd");
            $("#btnCancle").click(function () {
                closePanel();
            });
            $(".operating button:first").button({
                icons: {
                    primary: "ui-icon-circle-plus"
                }
            }).next().button({
                icons: {
                    primary: "ui-icon-close"
                }
            });
        });
    </script>
    <script type="text/javascript">
        function EditItem(id) {
            popdialog.openWithIframe("修改用户信息", 'MembersForm.aspx?param=' + id + '&random=' + Math.random(), 600, 430, true);
        }
        function RefreshData() {
            $("#<%=btnQuery.ClientID %>").click();
            //document.forms[0].submit();
            //window.location.reload();
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div style="text-align:center">
        <div class="divradius">
        <table style="margin-top:5px">
        <tr>
            <td>软件名称:</td><td><asp:DropDownList runat="server" ID="ddlSoftType" Width="120"/></td>
            <td>&nbsp;&nbsp;用户类型:</td>
            <td>
            <asp:DropDownList runat="server" ID="ddlCustomType" Width="80">
                <asp:ListItem Value="-1" Text="请选择..."></asp:ListItem>
                <asp:ListItem Value="0" Text="试用用户"></asp:ListItem>
                <asp:ListItem Value="1" Text="正式用户"></asp:ListItem>
            </asp:DropDownList>
            </td>
            <td>&nbsp;&nbsp;账号注册日期:</td>
            <td><asp:TextBox runat="server" ID="txtAddStartDate" Width="70"/></td>
            <td><label>至</label></td>
            <td><asp:TextBox runat="server" ID="txtAddEndDate" Width="70"/></td>
            <td>&nbsp;&nbsp;许可开通日期:</td>
            <td><asp:TextBox runat="server" ID="txtExpireStartDate" Width="70"/></td>
            <td><label>至</label></td>
            <td><asp:TextBox runat="server" ID="txtExpireEndDate" Width="70"/></td>
            <td>&nbsp;&nbsp;用户名:</td><td><asp:TextBox runat="server" ID="txtQuery" Width="80"/></td>
            <td>&nbsp;&nbsp;<asp:Button ID="btnQuery" runat="server" Width="50" Text="查 询" onclick="btnQuery_Click"/></td>
            <td>&nbsp;&nbsp;<asp:Button ID="Button1" runat="server" Width="50" Text="重 置" onclick="btnReset_Click"/></td>
        </tr>
        </table>
        </div>
        <hr />
        <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CssClass="tablesorter" 
            EnableModelValidation="True" 
            onrowcommand="GridView1_RowCommand" 
            onrowdeleting="GridView1_RowDeleting" 
            onselectedindexchanged="GridView1_SelectedIndexChanged" 
            onselectedindexchanging="GridView1_SelectedIndexChanging" 
            onrowdeleted="GridView1_RowDeleted" 
            onrowdatabound="GridView1_RowDataBound">
            <Columns>
                <asp:CheckBoxField />
                <asp:BoundField DataField="UserName" HeaderText="用户名" />
                <asp:BoundField DataField="UserTypeStr" HeaderText="用户类型" />
                <asp:BoundField DataField="SoftName" HeaderText="软件名称" />
                <asp:CheckBoxField DataField="IsValid" HeaderText="账号状态" />
                <asp:BoundField DataField="AddDate" HeaderText="账号注册日期" />
                <asp:BoundField DataField="RegistDate" HeaderText="许可开通日期" />
                <asp:BoundField DataField="ExpireDate" HeaderText="许可过期日期" />
                <asp:BoundField DataField="Days" HeaderText="许可剩余天数" />                
                <asp:CommandField ShowSelectButton="True" SelectText="修 改"/>
                <asp:CommandField ShowDeleteButton="True" DeleteText="删 除"/>
            </Columns>
            <HeaderStyle Height="28px" />
        </asp:GridView>
    <div class="divradius" style="text-align: left; vertical-align:middle; margin-top:10px">
    <div style="margin-top:8px; margin-left:10px">
        <label>记录总数:</label> <asp:Label runat="server" ID="lblCount"></asp:Label>
    </div>
    </div>
    </div>
    </form>
</body>
</html>
